<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
  </script>
  <style>
    #di {
      height: 500px;
      border: 5px solid greenyellow;
      width: 500px;
    }
  </style>
</head>

<body>
  <!-- 要求获取  鼠标当前坐标 -->
  mouse: <span id="mo"></span>
  <div id="di">
    在这里移动鼠标试试
  </div>
  <script>
    // 当网页元素加载完毕之后的响应事件
    $(document).ready(function () {
      $('#di').mousemove(function (e) {
        $('#mo').text('x:' + e.pageX + ' y:' + e.pageY)

      })
    })
  </script>
</body>

</html>